<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>用户</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, shrink-to-fit=no"/>
    <meta name="renderer" content="webkit"/>
    <meta name="force-rendering" content="webkit"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/layui@2.6.8/dist/css/layui.css">
    <link href="//cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
    <link href="/static/admin/static/css/main.css?v=#(version)" rel="stylesheet"/>
    <link href="/static/admin/pages/settings/css/setting.css?v=#(version)" rel="stylesheet"/>
</head>
<body class="layui-layout-body">
<div class="p-container">
    <div class="layui-card">
        <div class="layui-card-body">
            <div class="layui-tab layui-tab-brief" lay-filter="settingTab">
                <ul class="layui-tab-title">
                    <li class="layui-this" lay-id="1">基础设置</li>
                    <li lay-id="2">SEO设置</li>
                    <li lay-id="5">文章设置</li>
                    <li lay-id="4">邮箱服务</li>
                    <li lay-id="3">系统更新</li>
                </ul>
                <div class="layui-tab-content">

                    <div class="layui-tab-item layui-show">
                        <form class="layui-form" action="">
                            <div class="layui-input-inline"  style="display: none;">
                                <select lay-verify="" type="hidden"></select>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">网站名称</label>
                                <div class="layui-input-block">
                                    <input type="text" value="#option('WEB_NAME')" name="WEB_NAME" placeholder="请输入网站名称" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">网站ICO</label>
                                <div class="layui-input-block">
                                    <div class="p-upload-box" id="WEB_LOGO">
                                            <input type="hidden" value="#option('WEB_LOGO')" name="WEB_LOGO" value="">
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">网站域名</label>
                                <div class="layui-input-block">
                                        <input type="text" value="#option('WEB_SITE')" name="WEB_SITE" value="" placeholder="请输入网站域名,如http://yinpengfei.com" autocomplete="off" class="layui-input">
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label">网站标题</label>
                                <div class="layui-input-block">
                                    <input type="text" value="#option('WEB_TITLE')" name="WEB_TITLE" placeholder="请输入网站标题" autocomplete="off" class="layui-input">
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label">评论需审核</label>
                                <div class="layui-input-block">
                                    <input type="radio" name="WEB_COMMENT_IS_REVIEW" value="1" title="开启" #(optionCompare('WEB_COMMENT_IS_REVIEW', '1') ? 'checked': '')>
                                    <input type="radio" name="WEB_COMMENT_IS_REVIEW" value="0" title="关闭" #(optionCompare('WEB_COMMENT_IS_REVIEW', '0') ? 'checked': '')>
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label">允许注册新用户</label>
                                <div class="layui-input-block">
                                    <input type="radio" name="WEB_IS_REGISTER" value="1" title="允许" #(optionCompare('WEB_IS_REGISTER', '1') ? 'checked': '')>
                                    <input type="radio" name="WEB_IS_REGISTER" value="0" title="不允许" #(optionCompare('WEB_IS_REGISTER', '0') ? 'checked': '')>
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label">新用户默认角色</label>
                                <div class="layui-input-block" style="margin-left: 130px;width: 200px">
                                    <select name="WEB_REGISTER_DEFAULT_ROLE">
                                        <option value="user" #(optionCompare('WEB_REGISTER_DEFAULT_ROLE', 'user') ? 'selected': '')>普通用户</option>
                                        <option value="contribute" #(optionCompare('WEB_REGISTER_DEFAULT_ROLE', 'contribute') ? 'selected': '')>文章贡献</option>
                                        <option value="editor" #(optionCompare('WEB_REGISTER_DEFAULT_ROLE', 'editor') ? 'selected': '')>文章编辑</option>
                                        <option value="admin" #(optionCompare('WEB_REGISTER_DEFAULT_ROLE', 'amin') ? 'selected': '')>管理员</option>
                                    </select>
                                </div>

                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label">版权信息</label>
                                <div class="layui-input-block">
                                    <textarea name="WEB_COPYRIGHT" placeholder="请输入版权信息" class="layui-textarea">#option('WEB_COPYRIGHT')</textarea>
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label">Gravatar镜像源</label>
                                <div class="layui-input-block">
                                    <input type="text" value="#option('GRAVATAR_SOURCE', '//gravatar.loli.net/avatar/')" name="GRAVATAR_SOURCE" placeholder="请输入Gravatar镜像源" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-input-block">
                                    <button class="layui-btn addBtn" lay-submit lay-filter="optionForm">保存设置</button>
                                </div>
                            </div>
                        </form>
                    </div>


                    <div class="layui-tab-item">
                        <form class="layui-form" action="">
                            <div class="layui-input-inline"  style="display: none;">
                                <select lay-verify="" type="hidden"></select>
                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label">网站关键词</label>
                                <div class="layui-input-block">
                                    <textarea name="WEB_META_KEYWORD" placeholder="请输入META关键词,英文逗号分割" class="layui-textarea">#option('WEB_META_KEYWORD')</textarea>
                                </div>
                            </div>


                            <div class="layui-form-item">
                                <label class="layui-form-label">网站描述</label>
                                <div class="layui-input-block">
                                    <textarea name="WEB_META_DESC" placeholder="请输入META网站描述" class="layui-textarea">#option('WEB_META_DESC')</textarea>
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <div class="layui-input-block">
                                    <button class="layui-btn addBtn" lay-submit lay-filter="optionForm">保存设置</button>
                                </div>
                            </div>
                        </form>
                    </div>

                    <div class="layui-tab-item">
                        <form class="layui-form" action="">
                            <div class="layui-input-inline"  style="display: none;">
                                <select lay-verify="" type="hidden"></select>
                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label">自动生成摘要</label>
                                <div class="layui-input-block" style="margin-left: 130px;width: 200px">
                                    <select name="WEB_AUTO_GEN_SUMMARY">
                                        <option value="0" #(optionCompare('WEB_AUTO_GEN_SUMMARY', '0') ? 'selected': '')>关闭</option>
                                        <option value="1" #(optionCompare('WEB_AUTO_GEN_SUMMARY', '1') ? 'selected': '')>启用</option>
                                    </select>
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label">RSS生成方式</label>
                                <div class="layui-input-block" style="margin-left: 130px;width: 200px">
                                    <select name="WEB_RSS_GEN_MODE">
                                        <option value="0" #(optionCompare('WEB_RSS_GEN_MODE', '0') ? 'selected': '')>全文</option>
                                        <option value="1" #(optionCompare('WEB_RSS_GEN_MODE', '1') ? 'selected': '')>摘要</option>
                                    </select>
                                </div>

                            </div>


                            <div class="layui-form-item">
                                <label class="layui-form-label">RSS生成条数</label>
                                <div class="layui-input-block">
                                    <input type="number" value="#option('WEB_RSS_GEN_NUM', '20')" name="WEB_RSS_GEN_NUM" placeholder="请输入RSS生成条数" autocomplete="off" class="layui-input">
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <div class="layui-input-block">
                                    <button class="layui-btn addBtn" lay-submit lay-filter="optionForm">保存设置</button>
                                </div>
                            </div>
                        </form>
                    </div>


                    <div class="layui-tab-item">
                        <form class="layui-form" action="">
                            <div class="layui-input-inline"  style="display: none;">
                                <select lay-verify="" type="hidden"></select>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">SMTP服务</label>
                                <div class="layui-input-block">
                                    <input type="text" value="#option('SMTP_SERVER')" name="SMTP_SERVER" placeholder="请输入SMTP服务器,如smtp.126.com" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">邮箱账户</label>
                                <div class="layui-input-block">
                                    <input type="text" value="#option('SMTP_EMAIL')" name="SMTP_EMAIL" placeholder="请输入邮箱账户" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">授权码</label>
                                <div class="layui-input-block">
                                    <input type="text" value="#option('SMTP_AUTH')" name="SMTP_AUTH" placeholder="请输入授权码" autocomplete="off" class="layui-input">
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label">端口</label>
                                <div class="layui-input-block">
                                    <input type="text" value="#option('SMTP_PORT')" name="SMTP_PORT" placeholder="请输入服务端口" autocomplete="off" class="layui-input">
                                    <p style="color: #4D4D4D">如465,设置完后请同时把服务器对应的端口权限放开,非必要不建议设置25端口,如果是阿里云服务器需要用25端口的话,需要去阿里云申请解封端口</p>
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label">评论是否邮件通知</label>
                                <div class="layui-input-block">
                                    <input type="radio" name="COMMENT_IS_SEND_MAIL" value="1" title="通知" #(optionCompare('COMMENT_IS_SEND_MAIL', '1') ? 'checked': '')>
                                    <input type="radio" name="COMMENT_IS_SEND_MAIL" value="0" title="不通知" #(optionCompare('COMMENT_IS_SEND_MAIL', '0') ? 'checked': '')>
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <div class="layui-input-block">
                                    <button class="layui-btn addBtn" lay-submit lay-filter="optionForm2" >保存设置</button>
                                </div>
                            </div>
                        </form>
                    </div>


                    <div class="layui-tab-item">
                        <div class="update-content">
                            <div style="font-size: 15px;">
                                检测到新版本
                            </div>
                            <div>
                                <span class="updateLabel">版本:</span>
                                <span id="updateVersion"></span>
                            </div>
                            <div>
                                <span class="updateLabel">文件大小:</span>
                                <span id="updateSize"></span>
                            </div>
                            <div>
                                <span class="updateLabel">更新教程:</span>
                                <span>
                                     <a href="http://perfree.org.cn/doc/install-update.html" target="_blank">http://perfree.org.cn/doc/install-update.html</a>
                                </span>
                            </div>
                            <div>
                                <span class="updateLabel">更新内容:</span><br>
                                <span id="updateContent"></span>
                            </div>
                            <div>
                                <span class="updateLabel">下载地址:</span><br>
                                <span>
                                    <a class="download-btn" href="https://github.com/perfree/PerfreeBlog/releases" target="_blank">github</a>
                                    <a class="download-btn" href="https://gitee.com/perfree/PerfreeBlog/releases" target="_blank">gitee</a>
                                </span>
                            </div>

                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script src="//cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/layui@2.6.8/dist/layui.js"></script>
<script src="/static/public/js/main.js?v=#(version)"></script>
<script src="/static/public/js/reconnecting-websocket.min.js?v=#(version)"></script>
<script src="/static/admin/pages/settings/js/setting.js?v=#(version)"></script>
</body>
</html>